Skip to content

Conversation

surban
Copy link
Contributor

@surban surban commented Mar 20, 2025

The default stack size for the main thread is 1 MB as specified by linker options.
However, the default stack size for threads was only 64 kB.

This is surprisingly small and thus we increase it to 1 MB to match the main thread.

The default stack size for the main thread is 1 MB as specified by linker options.
However, the default stack size for threads was only 64 kB.

This is surprisingly small and thus we increase it to 1 MB to match the
main thread.
@rustbot
Copy link
Collaborator

rustbot commented Mar 20, 2025

r? @thomcc

rustbot has assigned @thomcc.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 20, 2025
@thomcc
Copy link
Member

thomcc commented Mar 23, 2025

I'm probably not the right person to review this.

r? libs

@rustbot rustbot assigned joboet and unassigned thomcc Mar 23, 2025
@joboet
Copy link
Member

joboet commented Mar 28, 2025

CC @g0djan, @alexcrichton, @abrown, @loganek (the target maintainers)
What do you think about this?

@alexcrichton
Copy link
Member

@bors: r+

This looks right to me yeah, thanks!

@bors
Copy link
Collaborator

bors commented Mar 28, 2025

📌 Commit 38cf49d has been approved by alexcrichton

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 28, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 29, 2025
…ze, r=alexcrichton

wasm: increase default thread stack size to 1 MB

The default stack size for the [main thread is 1 MB as specified by linker options](https://github.com/rust-lang/rust/blob/38cf49dde8a5b0b284bb6dffd423d223c9f8f7a3/compiler/rustc_target/src/spec/base/wasm.rs#L14).
However, the default stack size for threads was only 64 kB.

This is surprisingly small and thus we increase it to 1 MB to match the main thread.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138832 (Start using `with_native_path` in `std::sys::fs`)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 29, 2025
…ze, r=alexcrichton

wasm: increase default thread stack size to 1 MB

The default stack size for the [main thread is 1 MB as specified by linker options](https://github.com/rust-lang/rust/blob/38cf49dde8a5b0b284bb6dffd423d223c9f8f7a3/compiler/rustc_target/src/spec/base/wasm.rs#L14).
However, the default stack size for threads was only 64 kB.

This is surprisingly small and thus we increase it to 1 MB to match the main thread.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#138692 (Reject `{true,false}` as revision names)
 - rust-lang#138757 (wasm: increase default thread stack size to 1 MB)
 - rust-lang#138988 (Change the syntax of the internal `weak!` macro)
 - rust-lang#139056 (use `try_fold` instead of `fold`)
 - rust-lang#139057 (use `slice::contains` where applicable)
 - rust-lang#139086 (Various cleanup in ExprUseVisitor)
 - rust-lang#139097 (Add more tests for pin!().)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c82b88b into rust-lang:master Mar 29, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Mar 29, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
Rollup merge of rust-lang#138757 - rust-wasi-web:wasi-thread-stack-size, r=alexcrichton

wasm: increase default thread stack size to 1 MB

The default stack size for the [main thread is 1 MB as specified by linker options](https://github.com/rust-lang/rust/blob/38cf49dde8a5b0b284bb6dffd423d223c9f8f7a3/compiler/rustc_target/src/spec/base/wasm.rs#L14).
However, the default stack size for threads was only 64 kB.

This is surprisingly small and thus we increase it to 1 MB to match the main thread.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 2, 2025
…ze, r=alexcrichton

wasm: increase default thread stack size to 1 MB

The default stack size for the [main thread is 1 MB as specified by linker options](https://github.com/rust-lang/rust/blob/38cf49dde8a5b0b284bb6dffd423d223c9f8f7a3/compiler/rustc_target/src/spec/base/wasm.rs#L14).
However, the default stack size for threads was only 64 kB.

This is surprisingly small and thus we increase it to 1 MB to match the main thread.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants